package xyz.zhno.mall.common.mpg.query;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * 查询参数
 * @author zh_o
 */
@Data
@Accessors(chain = true)
@NoArgsConstructor
@AllArgsConstructor
public class BaseQuery implements Serializable {

    /**
     * 当前页数
     */
    @NotNull(message = "参数不合法")
    @Min(value = 1, message = "参数不合法")
    private Integer pageNum;

    /**
     * 每页显示条数
     */
    @NotNull(message = "参数不合法")
    @Min(value = 1, message = "参数不合法")
    private Integer pageSize = 8;

}
